﻿@model EWConfigurationWizardModel
@{
    ViewBag.Title = EWWebResources.Configuration_Wizard_PageTitle;
}

@using (Html.BeginRouteForm("EasyWeb_Configuration", FormMethod.Post, new { id = "easyweb-form-edit" }))
{
    <fieldset>
        <legend></legend>
        <div class="easyweb-section">
            <h2>@EWWebResources.Configuration_Prefix</h2>
            @if (Model.Prefix.HasStored)
            {
                @Html.DisplayFor(m => m.Prefix)
            }
            else
            {
                @Html.EditorFor(m => m.Prefix)
            }
        </div>
        <div class="easyweb-section">
            <h2>@EWWebResources.Configuration_Language</h2>
            @Html.EditorFor(m => m.Language)
        </div>
        <div class="easyweb-section">
            <input id="easyweb-action-submit" type="submit" value="@EWWebResources.Button_Save" />
            <a id="easyweb-action-cancel" href="@Url.RouteUrl("EasyWeb_Admin")">@EWWebResources.Button_Cancel</a>
        </div>
    </fieldset>
}

@section head {
    <style type="text/css">
        #easyweb-form-edit h2 {
            font-weight: bold;
            margin: 1em 0;
        }
        #easyweb-form-edit .easyweb-section {
            margin: 1em 0 0 0;
            border-top: 1px solid gray;
        }
        #easyweb-action-submit, #easyweb-action-cancel {
            margin: 1.5em 0 0 0;
        }
    </style>
}

@section scripts {
    <script type="text/javascript">
        (function ($) {
            $(function () {
                $("#easyweb-action-submit, #easyweb-action-cancel").button();
                EasyWeb.EWAdmin.initEWConfigurationLanguageModel();
            });
        })(jQuery);
    </script>
}